/*
 * @(#)UserDaoImpl.java 2013-4-10 ����01:35:11 Order
 */
package com.dingtalk.dingbotmgr.dao.impl;

import java.util.List;

import com.dingtalk.dingbotmgr.dao.CompanyDao;
import com.dingtalk.dingbotmgr.model.Company;
import com.dingtalk.dingbotmgr.model.Company.Type;
import org.springframework.stereotype.Component;

/**
 * UserDaoImpl
 *
 * @author wang
 * @version 1.0
 */
@Component("companyDao")
public class CompanyDaoImpl extends BaseDaoImpl<Company> implements CompanyDao {

    @Override
    public List<Company> listByType(Type type) {
        return list(Company.class, "from Company c where c.type = ?", new Object[] {type});
    }
}
